<template>
  <div class="main-view">
    <div class="nav-view">
        <Icon name="t"></Icon>
        <div class="nav-view-menu">
          <Button type="link" size="large">
            <a href="/">首页</a>
          </Button>
          <Button  type="link" size="large">
            <a href="https://gitee.com/tanyukang/t-ui">gitee</a>
          </Button>
        </div>
    </div>
    <div class="home-view">
      <div class="menu-view">
        <Menu />
      </div>
      <div class="router-view">
        <router-view v-slot="{ Component }">
          <transition mode="out-in" name="doc-content">
            <component :is="Component" />
          </transition>
        </router-view>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import Menu from "./Menu.vue";
</script>
<style lang="scss">
.main-view {
  overflow: hidden;
  .nav-view {
    height: 60px;
    padding: 10px;
    background-color: white;
    display: flex;
    justify-content: space-between;
    .icon{
      height: 60px;
      width: 60px;
      margin-left: 20px;
    }
    &-menu{
      display: flex;
      align-items: center;
      .t-button{
        margin-right: 20px;
      }
    }
  }
  .home-view {
    height: calc(100% - 60px);
    display: flex;
    background-color: #f8f8f8;
    .menu-view {
      width: 220px;
      height: 100%;
      overflow: auto;
      background-color: #f8f8f8;
      box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6),
        0 2px 4px 0 rgba(232, 237, 250, 0.6);
    }
    .router-view {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      height: 100%;
      .docs-content-enter-active,
      .doc-content-leave-active {
        transition: opacity 0.3s ease;
      }

      .doc-content-enter-from,
      .doc-content-leave-to {
        opacity: 0;
      }
    }
  }
}
</style>
